﻿<%@ Page Language="C#" CodeBehind="VipMemberCardAdd.aspx.cs" EnableEventValidation="false"
    Inherits="VipMemberCardAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <base target="_self">
    <title>会员登记卡片</title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #tabCard th
        {
            background-color: #B2DBF7;
            height: 24px;
        }
        #tabCard td
        {
            background-color: #FFFFFF;
            height: 24px;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="../css/css.css" />
    <link rel="stylesheet" type="text/css" href="/css/jquery-ui-1.7.2.custom.css" />
    <link rel="stylesheet" type="text/css" href="../JqueryUI/themes/ui-lightness/jquery-ui-1.7.2.custom.css">
    <link rel="stylesheet" type="text/css" href="/css/jquery-ui-1.7.2.custom.css" />

    <script type="text/javascript" src="../javascript/jquery-1.3.2.js"></script>

    <script type="text/javascript" src="../javascript/jquery-ui-1.7.2.custom.js"></script>

    <script type="text/javascript" src="../javascript/messageBox.js"></script>

    <script type="text/javascript" src="../javascript/formValidator.js"></script>

    <script type="text/javascript" src="../javascript/formValidatorRegex.js"></script>

    <script type="text/javascript" src="../javascript/Public.js"></script>

      <link rel="stylesheet" type="text/css" href="../css/calendar.css" />
     <script type="text/javascript" src="../javascript/jquery-calendar.js"></script>
     <script type="text/javascript" src="../javascript/cal.js"></script>


    <style type="text/css">
        table
        {
            font: 12px "宋体";
        }
        #tabCard th
        {
            background-color: #B2DBF7;
            height: 20px;
        }
        #tabCenter td
        {
            background-color: #B2DBF7;
            height: 20px;
        }
        #tabCard td
        {
            background-color: #FFFFFF;
            height: 24px;
        }
        .style1
        {
            color: #FF0066;
        }
    </style>

    <script type="text/javascript" language="javascript">

        $(document).ready(function() {
            jQuery.formValidator.initConfig({ formid: "mainForm", forcevalid: false, alertmessage: false, errorfocus: true, onerror: function(msg) { alert(msg) }, onsuccess: function() { return true; } });
            if ((jQuery.formValidator) == null) { return };


            //姓名  txtName
            $("#txtName").formValidator({ empty: false })
	                    .functionValidator({ fun: isemptycheck, onerror: ShowMessage("姓名", "1001") })//不可省略check
	                     .inputValidator({ min: 1, max: 12, onerror: ShowMessage("姓名", "1005") })
            //身份证号码  txtIdenfication
            $("#txtIdenfication").formValidator({ empty: true })
            //.functionValidator({ fun: isemptycheck, onerror: ShowMessage("身份证号码", "1001") })//不可省略check
	                    .functionValidator({ fun: isCardID, onerror: ShowMessage("身份证号码", "1037") })//不可省略check


            //会员编号   txtMemberNo
            $("#txtMemberNo").formValidator({ empty: false })
                         .regexValidator({ regexp: "num1", datatype: "enum", onerror: ShowMessage("会员编号", "1004") })
                         .inputValidator({ min: 1, max: 15, onerror: ShowMessage("会员编号", "1005") });

            //入会时间  txtInMemberTime
            $("#txtInMemberTime").formValidator({ empty: false })
                                 .functionValidator({ fun: isemptycheck, onerror: ShowMessage("入会时间", "1001") })//不可省略check
                                 .simpleDatepicker({ startdate: 1965, enddate: 2050 })
            $("#txtJobTime").formValidator({ empty: false })
                            .simpleDatepicker({ startdate: 1965, enddate: 2050 })
                            .functionValidator({ fun: isemptycheck, onerror: ShowMessage("工作时间", "1001") })

            //会员编号   txtMemberNo
            $("#txtMemberNo").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 15, onerror: ShowMessage("会员编号", "1005") })
            //出生年月日 txtBornDate
            $("#txtBornDate").simpleDatepicker({ startdate: 1965, enddate: 2050 })
                             .formValidator({ empty: false })
                             .functionValidator({ fun: isemptycheck, onerror: ShowMessage("出生年月日", "1001") })

            //籍贯    txtNation
            $("#txtNation").formValidator({ empty: true })
                        .inputValidator({ min: 1, max: 30, onerror: ShowMessage("籍贯", "1005") })
            //参加工作时间
            $("#txtJobTime").formValidator({ empty: false })
                            .functionValidator({ fun: isemptycheck, onerror: ShowMessage("参加工作时间", "1001") })
                            .simpleDatepicker({ startdate: 1965, enddate: 2050 })
            //收入(元)  txtIncome
            $("#txtIncome").formValidator({ empty: true })
                          .regexValidator({ regexp: "num1", datatype: "enum", onerror: ShowMessage("收入", "1004") })
	                     .inputValidator({ min: 1, max: 10, onerror: ShowMessage("收入", "1005") })
            //联席电话  txtTel
            $("#txtTel").formValidator({ empty: true })
                          .regexValidator({ regexp: "num1", datatype: "enum", onerror: ShowMessage("联席电话", "1004") })
	                     .inputValidator({ min: 1, max: 20, onerror: ShowMessage("联席电话", "1005") })
            //家庭地址  txtAddress
            $("#txtAddress").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 30, onerror: ShowMessage("家庭地址", "1005") })
            //连续工龄  txtCoWorkTime
            $("#txtCoWorkTime").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 3, onerror: ShowMessage("连续工龄", "1005") })
            //本企业工龄 txtWorkTime
            $("#txtWorkTime").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 3, onerror: ShowMessage("本企业工龄", "1005") })
            //从事何种有害人体健康工作  txtHate
            $("#txtHate").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 50, onerror: ShowMessage("从事何种有害人体健康工作", "1005") })
            //调出掉进原因  txtReason
            $("#txtReason").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 50, onerror: ShowMessage("调出掉进原因", "1005") })
            //工作经历   txtWorkHistory
            $("#txtWorkHistory").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 50, onerror: ShowMessage("工作经历", "1005") })
            //备注    txtRemarks
            $("#txtReason").formValidator({ empty: true })
	                     .inputValidator({ min: 1, max: 50, onerror: ShowMessage("备注", "1005") })

            IntialCheck();
            function IntialCheck() {
                if ($.trim($("#hfID").val()) == "") {
                    //$("#btnAdd").css({ "display": "block" });
                    $("#btnFamilyAdd").css({ "display": "none" });
                    //btnFamilyAdd.style.display = 'none';
                }
                else {
                    $("#btnFamilyAdd").css({ "display": "block" });
                    //$("#btnAdd").css({ "display": "block" });
                    //btnFamilyAdd.style.display = 'block';
                }

            }

            $("#btnFamilyAdd").click(function() {
                var userId = $("#hfID").val();
                var userName = $("#hfName").val();
                window.showModalDialog("VipFamilyList.aspx?Random=" + Math.random() + "&ID=" + userId + "&Name=" + encodeURIComponent(userName), window, "dialogWidth:800px;dialogHeight:400px;status=no;help=no ");
            });

            $("#rdIsMember_1").click(function() {

                $("#txtMemberNo").val("");

            });

        });
    </script>

</head>
<body>
    <form id="mainForm" runat="server">
    <table width="width: 600px" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <table width="width: 600px" cellpadding="0" cellspacing="0" class="table">
                    <tr>
                        <td valign="top">
                            <table width="100%" class="top" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        &nbsp;<b>当前位置:</b>&nbsp;<a href="#">系统管理</a>&nbsp;&gt;&gt;&nbsp;会员登记卡片
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 5px">
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <table id="tabCard" style="width: 600px; background-color: Silver" cellpadding="1px"
                                cellspacing="1px">
                                <tr>
                                    <th>
                                        姓名
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtName" runat="server" MaxLength="6" Width="100px"></asp:TextBox>
                                        <span class="style1">*</span>
                                    </td>
                                    <th>
                                        性别
                                    </th>
                                    <td>
                                        <asp:DropDownList ID="ddlSex" runat="server">
                                            <asp:ListItem Value="0">男</asp:ListItem>
                                            <asp:ListItem Value="1">女</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        单位
                                    </th>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlUion" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlUion_SelectedIndexChanged">
                                            <asp:ListItem Value="0">局机关</asp:ListItem>
                                        </asp:DropDownList>
                                        <span class="style1">*</span>
                                    </td>
                                    <th>
                                        部门
                                    </th>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlDepartment" runat="server">
                                            <asp:ListItem Value="0">局机关</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        班组
                                    </th>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlGroup" runat="server">
                                            <asp:ListItem Value="0">局机关</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <th>
                                        身份证号码
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtIdenfication" runat="server" MaxLength="18"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        是否会员
                                    </th>
                                    <td align="left">
                                        <asp:RadioButtonList ID="rdIsMember" runat="server" RepeatDirection="Horizontal">
                                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                            <asp:ListItem Value="0">否</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                    <th>
                                        会员编号
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtMemberNo" runat="server" MaxLength="12" Width="100px"></asp:TextBox>
                                        <span class="style1">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        入会时间
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtInMemberTime" CssClass="datepicker1 input_datepicker" runat="server"></asp:TextBox>
                                        <span class="style1">*</span>
                                    </td>
                                    <th>
                                        属性
                                    </th>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlProperty" runat="server">
                                            <asp:ListItem Value="0">全民</asp:ListItem>
                                            <asp:ListItem Value="1">多经</asp:ListItem>
                                        </asp:DropDownList>
                                        <span class="style1">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        出生年月日
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtBornDate" CssClass="datepicker1 input_datepicker" runat="server"></asp:TextBox>
                                        <span class="style1">*</span>
                                    </td>
                                    <th>
                                        文化程度
                                    </th>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlCuture" runat="server">
                                            <asp:ListItem Value="0">本科及本科以上</asp:ListItem>
                                        </asp:DropDownList>
                                        <span class="style1">*</span>

                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        籍贯
                                    </th>
                                    <td>
                                        <asp:TextBox ID="txtNation" runat="server" Width="93%" MaxLength="30"></asp:TextBox>
                                    </td>
                                    <th>
                                        职称
                                    </th>
                                    <td>
                                        <asp:DropDownList ID="ddllever" runat="server">
                                            <asp:ListItem Value="0">高级职称</asp:ListItem>
                                            <asp:ListItem Value="1">初级职称以下</asp:ListItem>
                                        </asp:DropDownList>
                                        <span class="style1">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        收入(元)
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtIncome" runat="server"></asp:TextBox>
                                    </td>
                                    <th>
                                        联系电话
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtTel" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        参加工作时间
                                    </th>
                                    <td align="left">
                                        <asp:TextBox ID="txtJobTime" CssClass="datepicker1 input_datepicker" runat="server"></asp:TextBox>
                                        <span class="style1">*</span>
                                   </td>
                                    <th>
                                        政治面貌
                                    </th>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlPro" runat="server">
                                            <asp:ListItem Value="0">党员</asp:ListItem>
                                            <asp:ListItem Value="1">团员</asp:ListItem>
                                        </asp:DropDownList>
                                        <span class="style1">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        家庭地址
                                    </th>
                                    <td align="left" colspan="3">
                                        <asp:TextBox ID="txtAddress" runat="server" Width="97%" MaxLength="30"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        连续工龄
                                    </th>
                                    <th>
                                        本企业工龄
                                    </th>
                                    <th colspan="2">
                                        从事何种有害人体健康工作
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtCoWorkTime" runat="server" Width="97%"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtWorkTime" runat="server" Width="97%"></asp:TextBox>
                                    </td>
                                    <td colspan="2">
                                        <asp:TextBox ID="txtHate" runat="server" Width="97%" MaxLength="30"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        调出调进原因
                                    </th>
                                    <td align="left" colspan="3">
                                        <asp:TextBox ID="txtReason" runat="server" Height="22px" TextMode="MultiLine" Width="98%"
                                            MaxLength="50"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        工作经历
                                    </th>
                                    <td align="left" colspan="3">
                                        <asp:TextBox ID="txtWorkHistory" runat="server" Height="40px" TextMode="MultiLine"
                                            Width="98%" MaxLength="50"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        备注
                                    </th>
                                    <td align="left" colspan="3">
                                        <asp:TextBox ID="txtRemarks" runat="server" Height="45px" TextMode="MultiLine" Width="98%"
                                            MaxLength="50"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 5px">
                        </td>
                    </tr>
                    <tr>
                        <td align="right" valign="middle" style="border: thin dotted #C0C0C0; background-color: #C5E5FC">
                            <table style="width: 100%">
                                <tr>
                                    <td>
                                    </td>
                                    <td style="width: 100px">
                                        <img id="btnFamilyAdd" alt="" src="../Images/button/btnFamily.gif" />
                                    </td>
                                    <td style="width: 100px">
                                        <asp:ImageButton ID="btnAdd" runat="server" ImageUrl="~/images/submit.gif" OnClick="btnAdd_Click" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <asp:HiddenField ID="hfID" runat="server" />
    <asp:HiddenField ID="hfName" runat="server" />
    </form>
</body>
</html>
